<template>
  <div class="call-special">
      <div class="call-special-box">
          <button>乘车人</button>
          <cube-button @click="showPicker">选择车型</cube-button>
          <div>
              <p>约<span>{{money}}</span>元</p>
              <p>暂无优惠活动</p>
          </div>
      </div>
      <cube-button>呼叫专车</cube-button>
  </div>
</template>

<script>
let col1Data = [
  {text: '舒适型1', value: '舒适型1'},
  {text: '舒适型2', value: '舒适型2'},
  {text: '舒适型3', value: '舒适型3'}]

export default {
  data () {
    return {
      money: 80
    }
  },
  mounted () {
    this.picker = this.$createPicker({
      title: '选择车型',
      data: [col1Data],
      onSelect: (selectedVal, selectedIndex, selectedText) => {
        this.$createDialog({
          type: 'warn',
          content: `Selected Item: <br/> - value: ${selectedVal.join(', ')} <br/>
            - index: ${selectedIndex.join(', ')} <br/> - text: ${selectedText.join(' ')}`,
          icon: 'cubeic-alert'
        }).show()
      },
      onCancel: () => {
        this.$createToast({
          type: 'correct',
          txt: 'Picker canceled',
          time: 1000
        }).show()
      }
    })
  },
  methods: {
    showPicker () {
      this.picker.show()
    }
  }
}
</script>

<style lang="css" scoped>
.call-special{
    position: fixed;
    bottom: 0;
    width: 90%;
    margin-left:5%;
   
}
.call-special .call-special-box{
     width: 100% ;
     margin-bottom: 10px;
      box-shadow: 0px 0px 20px #d9dee1
}
.call-special .call-special-box button{
    width: 50%;
    float: left;
    border: 0;
    border-bottom: 1px solid #cccccc;
    height: 50px;
    background-color: #ffffff;
    outline: none;
}
.call-special .call-special-box .cube-btn{
    color: #000;
    font-size: 14px;
}
.call-special .call-special-box button:nth-of-type(1){
    border-right: 1px solid #cccccc;
}
.call-special .call-special-box div{
    width: 100%;
   
    margin-bottom: 10px;
    padding-top:60px;
   

}
.call-special .call-special-box div p:nth-of-type(1){
    text-align: center;
    font-size: 16px;
    line-height: 30px;
   

}
.call-special .call-special-box div p:nth-of-type(1) span{
font-size: 24px;
}
.call-special .call-special-box div p:nth-of-type(2){
    font-size: 12px;
    line-height: 30px;
}
</style>